import { Entity, Column, PrimaryGeneratedColumn,ManyToMany, ManyToOne, JoinColumn, OneToOne , BaseEntity, OneToMany } from 'typeorm';
import { Video } from '../video/video.entity';
import { EnumInternetCelebrityCreateSourceEnum, EnumInternetCelebrityDeleteTagEnum, EnumInternetCelebrityGroupIsInitEnum, EnumInternetCelebrityGroupTypeEnum } from './internetCelebrityGroup.enum';

@Entity('internet_celebrity_group')
export class InternetCelebrityGroup extends BaseEntity {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ name: 'name' })
  name: string;

  @Column({ name: 'create_time' })
  create_time: Date;

  @Column({ name: 'update_time' })
  update_time: Date;
  
  @Column({ name: 'wx_user' })
  wx_user: string;

  @Column({ name: 'id_card' })
  id_card: string;

  @Column({ name: 'type' })
  type: EnumInternetCelebrityGroupTypeEnum;

  @Column({ name: 'is_init' })
  is_init: EnumInternetCelebrityGroupIsInitEnum;
  
  @Column({ name: 'delete_tag' })
  delete_tag: EnumInternetCelebrityDeleteTagEnum;
  
  @Column({ name: 'create_source' })
  create_source: EnumInternetCelebrityCreateSourceEnum;
  
  @OneToMany(() => Video, (ic) => ic.ic_info)
  video_: Video[];
}
